Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable experimental modules when rpm-ostree version >= 2021.9 #8202

Merged
merged 2 commits into from
Nov 22, 2021
Merged

Enable experimental modules when rpm-ostree version >= 2021.9 #8202

merged 2 commits into from
Nov 22, 2021

Conversation

zhengtianbao
Copy link
Member

@zhengtianbao zhengtianbao commented Nov 17, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

rpm-ostree provides experimental support for modules since version 2021.9, so we should use command rpm-ostree ex module enable to enable the cri-o stream first and then install from that stream.

refer: https://discussion.fedoraproject.org/t/cri-o-no-longer-available-through-rpm-ostree/33908

Which issue(s) this PR fixes:

Fixes #8197

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

[cri-o] Enable experimental modules when rpm-ostree version >= 2021.9

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 17, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @zhengtianbao. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 17, 2021
@k8s-triage-robot
Copy link

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-contributor-experience at kubernetes/community.

/check-cla

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 17, 2021
@hardoverflow
Copy link
Contributor

I have checked out the #8202 and can confirm that it works.

/lgtm

@k8s-ci-robot
Copy link
Contributor

@hardoverflow: changing LGTM is restricted to collaborators

In response to this:

I have checked out the #8202 and can confirm that it works.

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@cristicalin cristicalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea for sure but I'm skeptical about relying on experimental features in tools (ex stands for experimental in rpm-ostree).

@@ -11,6 +11,21 @@
set_fact:
is_ostree: "{{ ostree.stat.exists }}"

- name: get ostree version
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why so complex?

Suggested change
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" "
shell: "rpm-ostree --version | awk -F\' '/Version/{print $2}'"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your advice.

- name: get ostree version
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" "
args:
executable: /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for ansible-lint.

ostree_version: "{{ ostree_version_on_server.stdout }}"
when:
- is_ostree
- 'ostree_version_on_server.stdout is defined'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code would be cleaner if you just checked ostree_version_on_server is succceded (also not a fan of this extremely descriptive name) in case rpm-ostree is not installed and allowed the previous task to ignore the failure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's smells not good, thanks again.

become: true
when:
- is_ostree
- ostree_version is version('2021.9', '>=')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless ostree_version is in detaults/main.yml this would fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because I assume if is_ostree is defined then ostree_version will be defined too.

@cristicalin
Copy link
Contributor

General question, do we have any way to test this in CI?

@cristicalin
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 18, 2021
@oomichi
Copy link
Contributor

oomichi commented Nov 19, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2021
@floryut floryut added kind/container-managers Containers section in the release note and removed kind/bug Categorizes issue or PR as related to a bug. labels Nov 22, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, zhengtianbao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit a6fcf2e into kubernetes-sigs:master Nov 22, 2021
@floryut floryut mentioned this pull request Dec 21, 2021
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
…etes-sigs#8202)

* Enable experimental modules when rpm-ostree version >= 2021.9

* cleanup code
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jun 28, 2023
…etes-sigs#8202)

* Enable experimental modules when rpm-ostree version >= 2021.9

* cleanup code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/container-managers Containers section in the release note lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to install cri-o packages on Fedora CoreOS
7 participants